/*
 * Copyright(C) 2013-2017 AnZhouInc.ALL Rights Reserved.
 *
 * FileName: CustomController
 * 
 * Description: xxxxx
 *
 * History:
 * 版本号    作者    日期    操作
 * 1.0    ZhouFan 2018/2/11 0011   x
 * ...
 */
package com.fantazy.springswaggerdemo.controller;

import com.fantazy.springswaggerdemo.model.JsonResult;
import com.fantazy.springswaggerdemo.model.OutResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.service.MediaTypes;

/**
 * @author ZhouFan
 * @version 1.0
 * @date 2018/2/11 0011
 * @see
 */
@RestController
@Api(tags = "自定义业务")
@RequestMapping(value = "/custom")
public class CustomController {

    private static Logger LOGGER = LoggerFactory.getLogger( CustomController.class );

    @RequestMapping(value = "/upinsert", method = RequestMethod.GET)
    @ResponseBody
    @ApiOperation(value = "upinsert接口", nickname = "juejue", notes = "一个upinsert接口", tags = { "新增或插入接口" }, produces = MediaType.TEXT_PLAIN_VALUE)
    public JsonResult<String> custom() {
        LOGGER.error( "CustomController{}" );
        JsonResult<String> result = new JsonResult<>();
        result.setData( "upinsert" );
        return result;
    }
}